package command;

/**
 * @Author liangliangzhao
 * @data 2023/4/17 9:53
 */

public class LightOnCommand implements Command{
    LightReceiver light;
    public LightOnCommand(LightReceiver light) {
        super();
        this.light = light;
    }
    @Override
    public void execute() {
        light.on();// 调用接收者的方法
    }
    @Override
    public void undo() {
        light.off();// 调用接收者的方法
    }
}
